//
//  IntroduceTableCell.m
//  Daybook
//
//  Created by dllo on 16/5/30.
//  Copyright © 2016年 zhangbin. All rights reserved.
//

#import "IntroduceTableCell.h"
#import "Common.h"

@implementation IntroduceTableCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView {
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_titleLabel];
    _titleLabel.font = [UIFont systemFontOfSize:20 / 414.0  * self.contentView.frame.size.width];
    _titleLabel.textAlignment  = NSTextAlignmentLeft;
    
    self.detailLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_detailLabel];
    _detailLabel.textAlignment  = NSTextAlignmentRight;

    _detailLabel.font = [UIFont systemFontOfSize:20 / 414.0  * self.contentView.frame.size.width];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _titleLabel.frame = CGRectMake([CalculateFrameView setWidth:25], self.contentView.frame.size.height / 10, self.contentView.frame.size.width / 3, self.contentView.frame.size.height / 5 * 4);
    _detailLabel.frame = CGRectMake(self.contentView.frame.size.width / 2 - self.contentView.frame.size.width / 20, self.contentView.frame.size.height / 10, self.contentView.frame.size.width / 2, self.contentView.frame.size.height / 5 * 4);
    _detailLabel.backgroundColor = [UIColor whiteColor];
    _detailLabel.textAlignment = NSTextAlignmentRight;
}
- (void)setTitleLabel:(UILabel *)titleLabel {
    if (_titleLabel != titleLabel) {
        _titleLabel = titleLabel;
    }
}
- (void)setDetailLabel:(UILabel *)detailLabel {
    if (_detailLabel != detailLabel) {
        _detailLabel = detailLabel;
    }
}
@end
